#*************************************************************************#
#*									 *#
#*		Makefile for the RDT induction system			 *#
#*		--------------------------------------			 *#
#*									 *#
#*************************************************************************#


#	Set CFLAGS for your C compiler, e.g.
#
#	  * if you need to debug the programs (sorry about that!)
#	      CFLAGS = -g
#	    (You might also want to reactivate the lint commands that
#	    have been commented out below.)
#
#	  * if your C compiler supports higher optimization levels
#	      CFLAGS = -O3 etc


CFLAGS = -O2 -g -m32


#	Definitions of file sets

core.ln = \
	getnames.ln getdata.ln trees.ln header.ln

trees.ln = \
	besttree.ln build.ln info.ln\
	stats.ln classify.ln confmat.ln sort.ln $(core.ln)

rules.ln = \
	rules.ln genlogs.ln genrules.ln makerules.ln prunerule.ln\
	siftrules.ln testrules.ln stats.ln confmat.ln sort.ln $(core.ln)

core = \
	getnames.o getdata.o trees.o header.o

trees = \
	besttree.o build.o info.o\
	stats.o classify.o confmat.o sort.o $(core)

rules = \
	rules.o genlogs.o genrules.o makerules.o prunerule.o\
	siftrules.o testrules.o stats.o confmat.o sort.o $(core)


#  RDT decision tree generator

rdt:	rdt.o $(trees)
#	lint -x rdt.ln $(trees.ln) -lm
	cc -m32 -o rdt rdt.o $(trees) -lm

#	(Sample only: for compiler that supports global optimization,
#	 e.g. DECstation 3100)



.c.o:
#	lint -c $<
	cc $(CFLAGS) -c $<




#  Make everything

all:
	make rdt

	

clean:
	/bin/rm *.o rdt.exe
$(trees): defns.i types.i extern.i
$(rules): defns.i types.i extern.i
